package com.poorstu.web.flow;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.common.base.web.BaseAction;
import com.poorstu.manager.FlowManager;
import com.poorstu.model.FlowMod;

public class FlowChangeShowAction extends BaseAction {
	
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
	try {
		
		 int flowId=Integer.parseInt(request.getParameter("flowId"));
		 FlowManager flowManager=(FlowManager)getBean("flowManager");
		 
		 FlowMod flowMod=flowManager.selectFLowById(flowId);
		 
		request.setAttribute("flowMod", flowMod);
		
		
		return mapping.findForward("succ");
	} catch (Exception e) {
		e.printStackTrace();
		return mapping.findForward("failure");
	}

}
	
}
